<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
  </head>
  <body>
    <script>
    for(;;){
      let formula = prompt('请您选择+-*/')
      if(formula === '+'){
        let num1= +prompt('请您输入第一个数字')
        let num2= +prompt('请您输入第二个数字')
        alert(num1+num2)
      }else if(formula === '-'){
        let num1= +prompt('请您输入第一个数字')
        let num2= +prompt('请您输入第二个数字')
        alert(num1-num2)
      }else if(formula === '*'){
        let num1= +prompt('请您输入第一个数字')
        let num2= +prompt('请您输入第二个数字')
        alert(num1*num2)
      }else if(formula === '/'){
        let num1= +prompt('请您输入第一个数字')
        let num2= +prompt('请您输入第二个数字')
        alert(num1/num2)
      }else if(formula === 'q'){
        break
      }
    }
  </script>
  </body>
</html>